<template>
<div class="box">
  <div class="inspect-header">
    <i @click="goback" class="iconfont icon-fanhui"></i>
    <h2>孕期生活</h2>
  </div>
  <div class="inspect-list">
    <ul>
      <li @click="goDetail">
        <img src="https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=272541374,4138243054&fm=173&s=611150915A4377474C1B84CC030030BF&w=547&h=363&img.JPEG" alt="">
        <h3>预产期要怎么算？这个方法最简单</h3>
        <p>怀孕了，怎么知道预产期是哪一天？</p>
      </li>
      <li @click="goDetail">
        <img src="https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=4094914557,2962023041&fm=173&s=BD8438725FA4761147F994C702003027&w=640&h=356&img.JPEG" alt="">
        <h3>6招赶走坏心情</h3>
        <p>一份好心情对胎宝宝是十分有易的</p>
      </li>
    </ul>
  </div>
</div>
</template>
<script>
// import Vue from 'vue'
import axios from 'axios'
export default {
  data () {
    return {
      foodlist: []
    }
  },
  methods: {
    goback () {
      // this.$router.push(`/detail/${item.id}`)
      this.$router.go(-1)
    },
    goDetail () {
      this.$router.push('/detail')
    }
  },
  created () {
    axios.post('http://10.8.162.9:8081/ace/selectAceAll.do', {
      token: 'McjUBDjSAPiRmii/0a03pV+hf1QUDwYu0FD8RQH7Ao3rjFJwqmLYlkXfIhgZTawXiyZReSxV4j9oeFe60XQUjC6wiY+jPV2cz1R6O0lt+cQ0qqyDNpre3gA1dinsiLPt06OX2vC/h4XuRtQ3cQbg5vZDvkhG7redM0KiX4e9PJdSJyuVyla7ItV9jOHGvHRGHzr7pcJEgd8wmmO4uCamJw=='
    })
      .then((response) => {
        console.log(response.data)
        var data = response.data.list
        this.foodlist = data
        console.log(this.silklist)
      })
      .catch(function (error) {
        console.log(error)
      })
  }
}
</script>

<style lang="scss">
@import '@/lib/reset.scss';
.inspect-header {
  @include rect(100%, 0.42rem);
  background: rgba(235, 235, 235, 0.849);
  line-height: 0.42rem;
  i {
    float: left;
    font-size: 0.16rem;
    width: 0.3rem;
    text-align: center;
    font-weight: 700
  }
  h2 {
    float: left;
    width:80%;
    text-align: center;
    font-size: 0.16rem;
    font-weight: 500;
    color: #444343;
  }
}
.inspect-list {
  @include rect(100%, 100%);
  // overflow: auto;
  ul {
    @include rect(94%, 100%);
    margin: 3% auto;
    li {
      height: 1.2rem;
      border-bottom: 1px solid #cccccc;
      img {
        @include rect(1rem, 1rem);
        float: left;
        margin: 0.1rem;
      }
      h3 {
        @include rect(60%, auto);
        float: left;
        font-size: 0.14rem;
        line-height: 0.25rem;
        color: rgb(17, 17, 17);
        font-family: PingFangSC-regular;
        font-weight: 500;
        margin-top: 0.1rem;
      }
      p {
        float: left;
        font-size: 0.12rem;
        line-height: 0.2rem;
        color: #838383;
      }
    }
  }
}
</style>
